﻿





-- 取得人员部门工种技能信息
CREATE procedure [dbo].[RyInfo_BmGz_Get]
as
select bzid,bzmc,bzfid from Banz_Info

select gz from
(
select distinct gz1 gz from Ry_Info
union
select distinct gz2 gz from Ry_Info
union
select distinct gz3 gz from Ry_Info
union
select distinct gz4 gz from Ry_Info
union
select distinct gz5 gz from Ry_Info
) aa where gz is not null

select jn from
(
select distinct left(jndj1,charindex('|',jndj1)-1) jn from Ry_Info
union
select distinct left(jndj2,charindex('|',jndj2)-1) jn from Ry_Info
union
select distinct left(jndj3,charindex('|',jndj3)-1) jn from Ry_Info
) bb where jn is not null

select fbid,fbmc,fbfid from Fenb_Info